# 找到所有三位数的回文素数
def is_prime(n):
    if n < 2:
        return False
    for i in range(2, int(n**0.5)+1):
        if n % i == 0:
            return False
    return True


def is_palindrome(n):
    s = str(n)
    return s == s[::-1]


def main():
    for a in range(1, 10):
        for b in range(0, 10):
            n = a*100+b*10+a
            if is_prime(n):
                print(n)


if __name__ == '__main__':
    main()
